
package com.jf.cloud.biz.service.impl;

import com.jf.cloud.biz.mapper.QrcodeTicketMapper;
import com.jf.cloud.biz.model.QrcodeTicket;
import com.jf.cloud.biz.service.QrcodeTicketService;
import com.jf.cloud.biz.vo.QrcodeTicketVO;
import com.jf.cloud.common.database.dto.PageDTO;
import com.jf.cloud.common.database.util.PageUtil;
import com.jf.cloud.common.database.vo.PageVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 二维码数据信息
 *
 * @author zz
 * @date 2021-08-13 15:32:12
 */
@Service
public class QrcodeTicketServiceImpl implements QrcodeTicketService {

    @Autowired
    private QrcodeTicketMapper qrcodeTicketMapper;

    @Override
    public PageVO<QrcodeTicket> page(PageDTO pageDTO) {
        return PageUtil.doPage(pageDTO, () -> qrcodeTicketMapper.list());
    }

    @Override
    public QrcodeTicket getByTicketId(Long ticketId) {
        return qrcodeTicketMapper.getByTicketId(ticketId);
    }

    @Override
    public void save(QrcodeTicket qrcodeTicket) {
        qrcodeTicketMapper.save(qrcodeTicket);
    }

    @Override
    public void update(QrcodeTicket qrcodeTicket) {
        qrcodeTicketMapper.update(qrcodeTicket);
    }

    @Override
    public void deleteById(Long ticketId) {
        qrcodeTicketMapper.deleteById(ticketId);
    }

    @Override
    public QrcodeTicketVO getByTicket(String ticket) {
        return qrcodeTicketMapper.getByTicket(ticket);
    }

}
